<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>原型对象中的this指向</title>
</head>
<body>
  <script>
    function Star (uname,uage) {
      this.uname = uname;
      this.uage = uage;
    }
    var that;
    Star.prototype.sing = function () {
        console.log('会唱歌');
        that = this;
    }
    var ldh = new Star('刘德华',18);
    ldh.sing();//调用一下 赋值
    console.log(that === ldh);
  </script>
</body>
</html>